import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

const _import = file => () => import('@/views/' + file)
export default new Router({
  scrollBehavior: () => ({ y: 0 }),
  routes: [
    {
      path: '/',
      component: _import('Index'),
      meta: {
        name: '极佳简史'
      }
    },
    {
      path: '/history-detail',
      component: _import('HistoryDetail'),
      meta: {
        name: '极佳简史'
      }
    },
    {
      path: '/calendar',
      component: _import('Calendar'),
      meta: {
        name: '极佳简史'
      }
    },
    {
      path: '/today-words',
      component: _import('TodayWords'),
      meta: {
        name: '今日良言'
      }
    },
    {
      path: '/info-flow',
      component: _import('InfoFlow'),
      meta: {
        name: '极佳简史'
      }
    }
  ]
})
